package msgs;
/**
 * Used by the client to setup file transfers, and for the actual transfer itself
 * Team 9: Andrew Hayworth, Brian Parrella, Ryan Kortmann, Nina Papa
 * @author Andrew Hayworth
 *
 */
public class FileMsg extends SimpleMsg {
	public byte[] file;
	private String fname;
	private String ip, fromIp, to, from;
	private boolean request;
	private boolean requestOK;
	private boolean iAnsweredTheDamnQuestionAlready;
	
	public FileMsg(String toIp, String fromIp, String toUser, String fromUser) {
		super(null, fromIp, toIp);
		this.ip = toIp;
		this.fromIp = fromIp;
		this.to = toUser;
		this.from = fromUser;
		this.requestOK = true;
	}

	/**
	 * @return the file
	 */
	public byte[] getFile() {
		return file;
	}

	/**
	 * @param file the file to set
	 */
	public void setFile(byte[] file) {
		this.file = file;
	}

	/**
	 * @return the ip
	 */
	public String getIp() {
		return ip;
	}

	/**
	 * @param ip the ip to set
	 */
	public void setIp(String ip) {
		this.ip = ip;
	}

	/**
	 * @return the fromIp
	 */
	public String getFromIp() {
		return fromIp;
	}

	/**
	 * @param fromIp the fromIp to set
	 */
	public void setFromIp(String fromIp) {
		this.fromIp = fromIp;
	}

	/**
	 * @return the to
	 */
	public String getTo() {
		return to;
	}

	/**
	 * @param to the to to set
	 */
	public void setTo(String to) {
		this.to = to;
	}

	/**
	 * @return the from
	 */
	public String getFrom() {
		return from;
	}

	/**
	 * @param from the from to set
	 */
	public void setFrom(String from) {
		this.from = from;
	}

	/**
	 * @return the request
	 */
	public boolean isRequest() {
		return request;
	}

	/**
	 * @param request the request to set
	 */
	public void setRequest(boolean request) {
		this.request = request;
	}

	/**
	 * @return the requestOK
	 */
	public boolean isRequestOK() {
		return requestOK;
	}

	/**
	 * @param requestOK the requestOK to set
	 */
	public void setRequestOK(boolean requestOK) {
		this.requestOK = requestOK;
	}

	/**
	 * @return the iAnsweredTheDamnQuestionAlready
	 */
	public boolean isIAnsweredTheDamnQuestionAlready() {
		return iAnsweredTheDamnQuestionAlready;
	}

	/**
	 * @param answeredTheDamnQuestionAlready the iAnsweredTheDamnQuestionAlready to set
	 */
	public void setIAnsweredTheDamnQuestionAlready(
			boolean answeredTheDamnQuestionAlready) {
		iAnsweredTheDamnQuestionAlready = answeredTheDamnQuestionAlready;
	}

	/**
	 * @return the fname
	 */
	public String getFname() {
		return fname;
	}

	/**
	 * @param fname the fname to set
	 */
	public void setFname(String fname) {
		this.fname = fname;
	}
	
	
}
